﻿using Coldairarrow.Entity.Base_Manage;
using Coldairarrow.Entity.DTO;
using Coldairarrow.Entity.PB;
using Coldairarrow.Util;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.PB
{
    public partial interface IPB_ReturnBusiness
    {
        Task<PageResult<PB_Return>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<PB_Return> GetTheDataAsync(string id);
        Task AddDataAsync(PB_Return data);
        Task UpdateDataAsync(PB_Return data);
        Task DeleteDataAsync(List<string> ids);

        /// <summary>
        /// 回货单选择收货方
        /// </summary>
        /// <returns></returns>
        Task<List<Base_Department>> GetReturnDeptListDataAsync();

        /// <summary>
        /// 根据项目获取物料信息
        /// </summary>
        /// <param name="ProjectId">项目id</param>
        /// <returns></returns>
        Task<List<ViewPB_ReturnDTO>> GetReturnListDataAsync(string ProjectId);

        /// <summary>
        /// PDA根据项目获取物料信息
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task<List<ViewPB_ReturnDTO>> GetPDAReturnListDataAsync(ReturnCondition data);

        /// <summary>
        /// 回货单保存
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task SaveReturnDataAsync(PB_ReturnDTO data);

        /// <summary>
        /// 回货单审核
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task ToExamineReturnDataAsync(string id);

        /// <summary>
        /// 获取回货单list
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<PB_ReturnListDTO>> GetDataListDataAsync(PageInput<ConditionDTO> input);

        /// <summary>
        /// 查看回货单详细信息
        /// </summary>
        /// <param name="Id">回货单Id</param>
        /// <returns></returns>
        Task<PB_ReturnDataDTO> GetReturnDataAsync(string Id);
        Task<PB_ReturnDataDTO> GetReturnSortingData(string Qrcode);

        /// <summary>
        /// 获取回货分拣单list
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PageResult<PB_ReturnListDTO>> GetDataSortingListDataAsync(PageInput<ConditionDTO> input);

        /// <summary>
        /// 回货单分拣保存
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task SaveReturnSortingDataAsync(PB_ReturnSortingDataDTO data);

        /// <summary>
        /// 回货单分拣详细信息
        /// </summary>
        /// <param name="Id">回货单Id</param>
        /// <returns></returns>
        Task<PB_ReturnDataDTO> GetReturnSortingDataAsync(string Id);

        /// <summary>
        /// PDA回货单保存
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task SavePDAReturnDataAsync(PB_ReturnDTO data);

        /// <summary>
        /// 回货单选择收货仓库
        /// </summary>
        /// <param name="deptid">收货方ID</param>
        /// <returns></returns>
        Task<List<Base_Department>> GetReturnWarehouseListDataAsync(string deptid);

        /// <summary>
        /// 获取收货人对应的收货单信息
        /// </summary>
        /// <param name="userqecode">人员二维码</param>
        /// <returns></returns>
        Task<List<PB_DeliveryNotice>> GetUserReturnDataAsync(string userqecode);


        /// <summary>
        /// 回货点击确认生成收货单单
        /// </summary>
        /// <param name="data"></param>
        /// <returns></returns>
        Task AddReceivingDataAsync(PB_RevingAdd data);
        /// <summary>
        /// 多个分拣单生成收货单
        /// </summary>
        /// <param name="data">仓库id 分拣单</param>
        /// <returns></returns>
        Task AddBatchSorting(BatchSorting data);



    }

    /// <summary>
    /// PDA根据项目获取物料信息搜索
    /// </summary>
    public class ReturnCondition
    {
        /// <summary>
        /// 项目id
        /// </summary>
        public string ProjectId { get; set; }
        /// <summary>
        /// 搜索条件
        /// </summary>
       
        public string Keyword { get; set; }
        /// <summary>
        /// 分页条数
        /// </summary>
        public int? pageRows { get; set; }
        /// <summary>
        /// 楼号uid
        /// </summary>
        public string BuildingId { get; set; }
    }

}